fix(en_IN, es_MX, zh_CN): inherit en_GB bank provider so GB iban() is valid#2413
Open
CedricConday wants to merge 2 commits into
Open
fix(en_IN, es_MX, zh_CN): inherit en_GB bank provider so GB iban() is valid#2413CedricConday wants to merge 2 commits into
CedricConday wants to merge 2 commits into
Conversation
…cales type-check en_IN, es_MX and zh_CN now inherit en_GB.Provider; en_GB's untyped 'banks' tuple was inferred as fixed-length, making those subclasses' differing bank lists fail mypy as incompatible overrides. Annotating the base as Tuple[str, ...] resolves it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These locales fall back to GB IBANs but lacked a correct bank provider, producing invalid IBANs. They now inherit the en_GB bank provider.
Verified against
python-stdnum(reference IBAN validator): 300/300 generated IBANs passstdnum.iban.validate(). Existingtests/providers/test_bank.pysuite passes. Includes a regression test.AI disclosure: Prepared with AI assistance (Claude / Claude Code). All output was human-reviewed and verified — generated IBANs validated against
python-stdnumand the test suite passes.